public class 数组翻转 {
    public static int[] reversal(int[] arr){
        int temp=0;
        for (int i = 0; i < arr.length/2; i++) {
            temp=arr[arr.length-i-1];
            arr[arr.length-i-1]=arr[i];
            arr[i]=temp;
        }
        for (int i = 0; i <arr.length-1 ; i++) {
            System.out.print(arr[i]+" ");
        }
        return arr;
    }
    public static void main(String[] args) {
        int[] arr = {32,539,2031,543,2,5,432};
        reversal(arr);
    }
}
